package com.gopay.common.constants.bank;

/** 
 * 工行快捷银行返回信息枚举
 * @ClassName: IcbcExpayConstants 
 * @author w_jiqing 
 * @date 2017年9月6日 下午1:50:00  
 */ 
public enum IcbcExpayConstants {
    
    _1("1","交易成功，已清算"),
    _2("2","交易失败"),
    _3("3","交易可疑"),
    _4("4","超过当日错误次数"),
    _5("5","超过历史错误次数"),
    _6("6","支付密码校验失败"),
    _7("7","动态密码重发成功"),
    _8("8","动态密码重发失败");
    
    public final String key;
    public final String value;
    private IcbcExpayConstants(String key, String value) {
        this.key = key;
        this.value = value;
    }
    public static String getRetMsg(String key){
        IcbcExpayConstants[] cs =IcbcExpayConstants.class.getEnumConstants();
        for(IcbcExpayConstants c:cs){
            if(c.getKey().equals(key)){
                return c.getValue();
            }
        }
        throw new RuntimeException(" wrong " + IcbcExpayConstants.class.getSimpleName() + " string key! key=" + key);
    }
    public String getKey() {
        return key;
    }
    public String getValue() {
        return value;
    }

    
    

}
